// 引入 pinia
import { defineStore } from 'pinia'
import { order } from "@/api"

export const orderStore = defineStore('order', {
	state: () => ({
		orderId: ''
	}),
	actions: {
		submitOrder(data) {
			order.reqSubmitOrder(data).then((res) => {
				if(res.code === 1) {
					this.orderId = res.data
				}
			})
		}
	}
})